import http from ".."

enum Api {
    roleUrl = '/api/role/backstage/'
}

// 获取角色列表
export async function getRoleApi() {
    return await http.get(Api.roleUrl)
}
// 添加角色
export async function postRoleApi(parms: any) {
    return await http.post(Api.roleUrl, parms)
}
// 修改角色
export async function putRoleApi(id: string | number, parms: any) {
    return await http.put(Api.roleUrl, id, parms)
}
// 删除角色
export async function delRoleApi(id: string | number) {
    return await http.delete(Api.roleUrl, id)
}
